package executable.instance;

public class BasicIntClass {
    private int number1 = 1;
    private int number2;

    public BasicIntClass() {
    }

    public BasicIntClass(int number2) {
        this.number2 = number2;
    }

    public int getNumber1() {
        return number1;
    }

    public void setNumber1(int number1) {
        this.number1 = number1;
    }

    public int getNumber2() {
        return number2;
    }

    public void setNumber2(int number2) {
        this.number2 = number2;
    }

    public static BasicIntClass onlyCreate() {
        return new BasicIntClass(5);
    }

    public static BasicIntClass onlyCreateWithoutParams() {
        final BasicIntClass basicIntClass = new BasicIntClass();
        return basicIntClass;
    }

    public static int createAndReturn() {
        final BasicIntClass basicIntClass = new BasicIntClass(5);
        return basicIntClass.getNumber1();
    }

    public static int createAndReturn2() {
        final BasicIntClass basicIntClass = new BasicIntClass(5);
        return basicIntClass.getNumber2();
    }

    public static int createAndAdd() {
        final BasicIntClass basicIntClass = new BasicIntClass(5);
        return basicIntClass.getNumber1() + basicIntClass.getNumber2();
    }

    public static int createAndSub() {
        final BasicIntClass basicIntClass = new BasicIntClass(1001);
        return basicIntClass.getNumber1() - basicIntClass.getNumber2();
    }

    public static int createAndSub2() {
        final BasicIntClass basicIntClass = new BasicIntClass();
        return basicIntClass.getNumber1() - basicIntClass.getNumber2();
    }

    public static int create2AndDoStuff() {
        final BasicIntClass basicIntClass1 = new BasicIntClass();
        final BasicIntClass basicIntClass2 = new BasicIntClass(56);
        basicIntClass2.setNumber1(basicIntClass2.getNumber2() - basicIntClass1.getNumber1());
        return basicIntClass2.getNumber1() + 25; //55+25 = 80
    }


}
